<?php if(isset($row)) { ?>
	<div class="clearfix">
	<div id = "infos" class="half-size pull-left border-right">
		<div class="input-group input-group-lg">
				<span class="input-group-addon">
					<label>Pseudo</label>
				</span>
			<span class="form-control"><?php if(isset($row['pseudo'])) { echo $row['pseudo']; } ?></span>
		</div>
		<br />
		<div class="input-group input-group-lg">
				<span class="input-group-addon">
					<label>Nom</label>
				</span>
			<span class="form-control"><?php if(isset($row['lastName'])) { echo $row['lastName']; } ?></span>
		</div>
		<br />
		<div class="input-group input-group-lg">
				<span class="input-group-addon">
					<label>Prénom</label>
				</span>
			<span class="form-control"><?php if(isset($row['firstName'])) { echo $row['firstName']; } ?></span>
		</div>
		<?php if (isset($row_art_stat) && $article) { ?>
			<br />
			<h4>Note moyenne des articles publiés :
				<?= colorNote($row_art_stat['moy']) ?>
			</h4>
		<?php }
		if (isset($row_com_stat)) { ?>
			<br />
			<h4>Note moyenne des commentaires publiés :
				<?= colorNote($row_com_stat['moy']) ?>
			</h4>
		<?php } ?>
		<?php if(isset ($user['roleID'])) {
			if($user['roleID'] >= 2 && $row['roleID'] <= 1) { ?>
		<h4 class="change-img">Modifier le Grade :</h4>
		<form action="user.php?id=<?= $_GET['id'] ?>" method="post" class="clearfix">
			<div class="form-group pull-left">
				<select name="change-role" class="form-control">
					<option value="0" <?php if($row['roleID'] == 0) { echo 'selected';} ?> ><?= $tab_roles[0] ?></option>
					<option value="1" <?php if($row['roleID'] == 1) { echo 'selected';} ?> ><?= $tab_roles[1] ?></option>
					<option value="2" <?php if($row['roleID'] == 2) { echo 'selected';} ?> ><?= $tab_roles[2] ?></option>
					<option value="3" <?php if($row['roleID'] == 3) { echo 'selected';} ?> ><?= $tab_roles[3] ?></option>
				</select>
			</div>
			<button type="submit" name="submit-role" class="btn btn-default pull-right ">OK</button>
		</form>
		<?php }
		} ?>

	</div>
	<div class="pull-left half-size border-left">
		<div class="clearfix">
			<div class="pull-left">
			<?php if(isset($row['link']) && $row['imgStatus'] != 3) { ?>
					<img src="<?= imgLink($row['link'])."?".time() ?>" class="img-rounded" width="202px" height="202px"/>
			<?php } else { ?>
					<img src="<?= imgLink("img/avatar/default.png") ?>" class="img-rounded" width="202px" height="202px"/>
			<?php }?>
			</div>
			<div class="pull-left info-access">
				<br />
				<strong>Grade :</strong> <br />
				<?php echo($tab_roles[$row['roleID']]); ?> <br />
				<br />
				<strong>Statut :</strong> <br />
				<?php echo($tab_status[$row['statusID']]); ?> <br />
				<br />
				<strong>Date d'inscription :</strong> <br />
				<?php if(isset($row['hireDate'])) echo(strftime("%d %B %Y",strtotime($row['hireDate']))); ?>
			</div>
		</div>
		<?php if(isset ($user['roleID'])) {
			if($user['roleID'] >= 2 && $row['roleID'] <= 1) { ?>
				<h4 class="change-img">Modifier l'image :</h4>
				<form action="user.php?id=<?= $_GET['id'] ?>" method="post" enctype="multipart/form-data" class="change-img">
					<div class="form-group inline-form">
						<label for="upload">Image en local :<small> (inférieur à 5 Mio)</small></label>
						<input type="file" name="avatar" id="upload" required/>
					</div>
					<button type="submit" name="submit-image-upload" class="btn btn-default change-img-btn pull-right ">OK</button>
				</form>
				<form action="user.php" method="post" class="change-img">
					<div class="form-group inline-form">
						<label for="url">Image sur internet :</label> <br />
						<input type="url" name="avatar" class="form-control" id="url" required/>
					</div>
					<button type="submit" name="submit-image-url" class="btn btn-default pull-right ">OK</button>
				</form>
			<?php }
		} ?>
	</div>
	</div>
	<br />
	<?php if(isset ($user['roleID'])) {
		if($user['roleID'] >= 2 && $row['roleID'] <= 1) { ?>
			<div class="btn-user clearfix">
				<form action="user.php?id=<?= $_GET['id'] ?>" method="post">
					<?php if ($row['statusID'] == 12 || $row['statusID'] == 13) { ?>
					<button type="submit" name="no_article" value="0" class="btn btn-primary btn-lg btn-left pull-left">Débloquer les articles</button>
					<?php } else { ?>
					<button type="submit" name="no_article" value="1" class="btn btn-warning btn-lg btn-left pull-left<?php if($row['statusID'] == 19) { echo ' disabled'; } ?>">Bloquer les articles</button>
					<?php }
					if ($row['statusID'] == 11 || $row['statusID'] == 13) { ?>
					<button type="submit" name="no_comment" value="0" class="btn btn-primary btn-lg pull-left">Débloquer les commentaires</button>
					<?php } else { ?>
					<button type="submit" name="no_comment" value="1" class="btn btn-warning btn-lg pull-left<?php if($row['statusID'] == 19) { echo ' disabled'; } ?>">Bloquer les commentaires</button>
					<?php }
					if ($row['statusID'] == 19) { ?>
					<button type="submit" name="ban" value="0" class="btn btn-success btn-lg btn-right pull-left">Débannir</button>
					<?php } else { ?>
					<button type="submit" name="ban" value="1" class="btn btn-danger btn-lg btn-right pull-left">Bannir</button>
					<?php } ?>
				</form>
			</div>
		<?php }
	} ?>
<?php } ?>